package com.mercury.service;

import com.alibaba.fastjson.JSONObject;
import com.mercury.dao.IPaintingsDao;
import com.mercury.entity.Paintings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PaintingsService {

    @Autowired
    IPaintingsDao paintingsDao;

    public List<Paintings> queryByAuthor(JSONObject json) {
        return paintingsDao.queryByAuthor(json.getString("Author"));
    }

    public List<Paintings> queryAllPaintings() {
        return paintingsDao.queryAllPaintings();
    }
}
